﻿package com.eitb.formaters{
	import com.eitb.literales.*;
	public class WindGuruLanguageFormater {
		public var idioma:String;

		public function WindGuruLanguageFormater(idioma:int):void {
			this.idioma = parseLanguage(idioma);
		}

		public function format():String {
			return this.idioma;
		}
		
		private function parseLanguage(idioma:int):String {
			var rslt:String;
			switch (idioma) {
				case Literales.ES :
					rslt = "es";
					break;
				case Literales.FR :
					rslt = "fr";
					break;
				case Literales.EN :
					rslt = "en";
					break;
				case Literales.EU :
					rslt = "baq";
					break;
			}			
			return rslt;
		}
		
	}
}